package com.ruoyi.project.lely.bean.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import org.hibernate.validator.constraints.Length;

/**
 * 分享
 *
 * @author luoyong
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName(value = "`ly_agency_share`", autoResultMap = true)
public class LyAgencyShare {


    @ApiModelProperty("ID")
    @TableId("id")
    private Long id;


    @ApiModelProperty("用户id")
    @TableField(value = "`user_id`")
    private Integer userId;


    @Length(max = 255, message = "url地址长度不能超过255位")
    @ApiModelProperty("url地址")
    @TableField(value = "`share_url`")
    private String shareUrl;


    @ApiModelProperty("分享对象类型 1：商品 2：品牌商铺 3：团购")
    @TableField(value = "`type`")
    private Integer type;


    @ApiModelProperty("分享对象id")
    @TableField(value = "`share_obj_id`")
    private Integer shareObjId;


    @ApiModelProperty("添加时间")
    @TableField(value = "`create_time`", fill = FieldFill.INSERT)
    private LocalDateTime createTime;


    @ApiModelProperty("最后更新时间")
    @TableField(value = "`update_time`", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
